<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateInvitationRegistersTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('invitation_registers', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->integer('activity_id')->comment('活动ID');
            $table->integer('invite_id')->comment('邀请者ID');
            $table->integer('register_count')->default(0)->comment('注册者数量');
            $table->integer('realname_count')->default(0)->comment('实名者数量');
            $table->string('is_allowed')->default(\App\Enums\AvailableStatus::ENABLED)->comment('是否允许参与活动');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('invitation_registers');
    }
}
